.TH "QwtLegendItem" 3 "Tue Nov 20 2012" "Version 5.2.3" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtLegendItem \- 
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_legend_item\&.h>\fP
.PP
Inherits \fBQwtTextLabel\fP\&.
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBIdentifierMode\fP { \fBNoIdentifier\fP =  0, \fBShowLine\fP =  1, \fBShowSymbol\fP =  2, \fBShowText\fP =  4 }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBsetChecked\fP (bool on)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBchecked\fP (bool)"
.br
.ti -1c
.RI "void \fBclicked\fP ()"
.br
.ti -1c
.RI "void \fBpressed\fP ()"
.br
.ti -1c
.RI "void \fBreleased\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBQwtLegendItem\fP (QWidget *parent=0)"
.br
.ti -1c
.RI "\fBQwtLegendItem\fP (const \fBQwtSymbol\fP &, const QPen &, const \fBQwtText\fP &, QWidget *parent=0)"
.br
.ti -1c
.RI "virtual \fB~QwtLegendItem\fP ()"
.br
.ti -1c
.RI "const QPen & \fBcurvePen\fP () const "
.br
.ti -1c
.RI "virtual void \fBdrawIdentifier\fP (QPainter *, const QRect &) const "
.br
.ti -1c
.RI "virtual void \fBdrawItem\fP (QPainter *p, const QRect &) const "
.br
.ti -1c
.RI "int \fBidentifierMode\fP () const "
.br
.ti -1c
.RI "int \fBidentifierWidth\fP () const "
.br
.ti -1c
.RI "bool \fBisChecked\fP () const "
.br
.ti -1c
.RI "\fBQwtLegend::LegendItemMode\fP \fBitemMode\fP () const "
.br
.ti -1c
.RI "void \fBsetCurvePen\fP (const QPen &)"
.br
.ti -1c
.RI "void \fBsetIdentifierMode\fP (int)"
.br
.ti -1c
.RI "void \fBsetIdentifierWidth\fP (int width)"
.br
.ti -1c
.RI "void \fBsetItemMode\fP (\fBQwtLegend::LegendItemMode\fP)"
.br
.ti -1c
.RI "void \fBsetSpacing\fP (int \fBspacing\fP)"
.br
.ti -1c
.RI "void \fBsetSymbol\fP (const \fBQwtSymbol\fP &)"
.br
.ti -1c
.RI "virtual void \fBsetText\fP (const \fBQwtText\fP &)"
.br
.ti -1c
.RI "virtual QSize \fBsizeHint\fP () const "
.br
.ti -1c
.RI "int \fBspacing\fP () const "
.br
.ti -1c
.RI "const \fBQwtSymbol\fP & \fBsymbol\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdrawText\fP (QPainter *, const QRect &)"
.br
.ti -1c
.RI "bool \fBisDown\fP () const "
.br
.ti -1c
.RI "virtual void \fBkeyPressEvent\fP (QKeyEvent *)"
.br
.ti -1c
.RI "virtual void \fBkeyReleaseEvent\fP (QKeyEvent *)"
.br
.ti -1c
.RI "virtual void \fBmousePressEvent\fP (QMouseEvent *)"
.br
.ti -1c
.RI "virtual void \fBmouseReleaseEvent\fP (QMouseEvent *)"
.br
.ti -1c
.RI "virtual void \fBpaintEvent\fP (QPaintEvent *)"
.br
.ti -1c
.RI "void \fBsetDown\fP (bool)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A legend label\&. 

\fBQwtLegendItem\fP represents a curve on a legend\&. It displays an curve identifier with an explaining text\&. The identifier might be a combination of curve symbol and line\&. In readonly mode it behaves like a label, otherwise like an unstylish push button\&.
.PP
\fBSee also:\fP
.RS 4
\fBQwtLegend\fP, \fBQwtPlotCurve\fP 
.RE
.PP

.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBQwtLegendItem::IdentifierMode\fP"

.PP
Identifier mode\&. Default is ShowLine | ShowText 
.PP
\fBSee also:\fP
.RS 4
\fBidentifierMode()\fP, \fBsetIdentifierMode()\fP 
.RE
.PP

.SH "Constructor & Destructor Documentation"
.PP 
.SS "QwtLegendItem::QwtLegendItem (QWidget *parent = \fC0\fP)\fC [explicit]\fP"
\fBParameters:\fP
.RS 4
\fIparent\fP Parent widget 
.RE
.PP

.SS "QwtLegendItem::QwtLegendItem (const \fBQwtSymbol\fP &symbol, const QPen &curvePen, const \fBQwtText\fP &text, QWidget *parent = \fC0\fP)\fC [explicit]\fP"
\fBParameters:\fP
.RS 4
\fIsymbol\fP Curve symbol 
.br
\fIcurvePen\fP Curve pen 
.br
\fItext\fP Label text 
.br
\fIparent\fP Parent widget 
.RE
.PP

.SH "Member Function Documentation"
.PP 
.SS "const QPen & QwtLegendItem::curvePen () const"
\fBReturns:\fP
.RS 4
The curve pen\&. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetCurvePen()\fP 
.RE
.PP

.SS "void QwtLegendItem::drawIdentifier (QPainter *painter, const QRect &rect) const\fC [virtual]\fP"
Paint the identifier to a given rect\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIrect\fP Rect where to paint 
.RE
.PP

.SS "void QwtLegendItem::drawItem (QPainter *painter, const QRect &rect) const\fC [virtual]\fP"
Draw the legend item to a given rect\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpainter\fP Painter 
.br
\fIrect\fP Rect where to paint the button 
.RE
.PP

.SS "int QwtLegendItem::identifierMode () const"
Or'd values of IdentifierMode\&. 
.PP
\fBSee also:\fP
.RS 4
\fBsetIdentifierMode()\fP, \fBIdentifierMode\fP 
.RE
.PP

.SS "int QwtLegendItem::identifierWidth () const"
Return the width of the identifier
.PP
\fBSee also:\fP
.RS 4
\fBsetIdentifierWidth()\fP 
.RE
.PP

.SS "\fBQwtLegend::LegendItemMode\fP QwtLegendItem::itemMode () const"
Return the item mode
.PP
\fBSee also:\fP
.RS 4
\fBsetItemMode()\fP 
.RE
.PP

.SS "void QwtLegendItem::setChecked (boolon)\fC [slot]\fP"
Check/Uncheck a the item
.PP
\fBParameters:\fP
.RS 4
\fIon\fP check/uncheck 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetItemMode()\fP 
.RE
.PP

.SS "void QwtLegendItem::setCurvePen (const QPen &pen)"
Set curve pen\&. 
.PP
\fBParameters:\fP
.RS 4
\fIpen\fP Curve pen
.RE
.PP
\fBSee also:\fP
.RS 4
\fBcurvePen()\fP 
.RE
.PP

.SS "void QwtLegendItem::setIdentifierMode (intmode)"
Set identifier mode\&. Default is ShowLine | ShowText\&. 
.PP
\fBParameters:\fP
.RS 4
\fImode\fP Or'd values of IdentifierMode
.RE
.PP
\fBSee also:\fP
.RS 4
\fBidentifierMode()\fP 
.RE
.PP

.SS "void QwtLegendItem::setIdentifierWidth (intwidth)"
Set the width for the identifier Default is 8 pixels
.PP
\fBParameters:\fP
.RS 4
\fIwidth\fP New width
.RE
.PP
\fBSee also:\fP
.RS 4
\fBidentifierMode()\fP, \fBidentifierWidth()\fP 
.RE
.PP

.SS "void QwtLegendItem::setItemMode (\fBQwtLegend::LegendItemMode\fPmode)"
Set the item mode The default is QwtLegend::ReadOnlyItem
.PP
\fBParameters:\fP
.RS 4
\fImode\fP Item mode 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBitemMode()\fP 
.RE
.PP

.SS "void QwtLegendItem::setSpacing (intspacing)"
Change the spacing 
.PP
\fBParameters:\fP
.RS 4
\fIspacing\fP Spacing 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBspacing()\fP, \fBidentifierWidth()\fP, \fBQwtTextLabel::margin()\fP 
.RE
.PP

.SS "void QwtLegendItem::setSymbol (const \fBQwtSymbol\fP &symbol)"
Set curve symbol\&. 
.PP
\fBParameters:\fP
.RS 4
\fIsymbol\fP Symbol
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsymbol()\fP 
.RE
.PP

.SS "void QwtLegendItem::setText (const \fBQwtText\fP &text)\fC [virtual]\fP"
Set the text to the legend item
.PP
\fBParameters:\fP
.RS 4
\fItext\fP Text label 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQwtTextLabel::text()\fP 
.RE
.PP

.PP
Reimplemented from \fBQwtTextLabel\fP\&.
.SS "int QwtLegendItem::spacing () const"
Return the spacing 
.PP
\fBSee also:\fP
.RS 4
\fBsetSpacing()\fP, \fBidentifierWidth()\fP, \fBQwtTextLabel::margin()\fP 
.RE
.PP

.SS "const \fBQwtSymbol\fP & QwtLegendItem::symbol () const"
\fBReturns:\fP
.RS 4
The curve symbol\&. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSymbol()\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
